home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Tool Chest / Testing & Debugging / Debuggers & dcmds / MacsBug 6.5d9 / MacsBug Release Notes < prev    next >
Encoding:
Text File  |  1994-07-26  |  23.3 KB  |  501 lines  |  [TEXT/MPS ]

  1. ========================================
  2. MacsBug Release Notes and Bedtime Tales
  3. by Jim Murphy and Dave Lyons
  4. ========================================
  5.  
  6. • 6.5d9 - TOTALLY NEW STUFF
  7.           -----------------
  8.           Added the DMA command (dump memory in ASCII).  The syntax is just like DM.
  9.  
  10.           Added .S suffix ("strip").  For example, PC.S is the same as PC if you are
  11.           in 32-bit MMU mode, or (PC & 0x00FFFFFF) if you are in 24-bit MMU mode.
  12.           MacsBug actually calls the StripAddress trap to implement this.
  13.  
  14.  
  15.           ENHANCEMENTS
  16.           ------------
  17.           When you break into MacsBug at boot time by holding down the Control key, now
  18.           it shows a more enlightening message.  Hopefully this will stop people from
  19.           writing up bugs that say "I rebooted with the control key held down, and I got
  20.           a User Break!"
  21.  
  22.           When you break into MacsBug during boot, it displays the name of the currently-
  23.           loading extension, if any.
  24.           
  25.           Command lines consisting only of "G", "T", or "S" do not appear in the command
  26.           line history (Command-V / Command-B).  The side-effect is that Command-G, -S,
  27.           and -T do not enter anything into the command line history.
  28.  
  29.           The SET command now displays its syntax if you tell it something stupid.
  30.  
  31.           "HZ" shows "Mod" for Modern Memory Manager heaps (it used to say "Fig").
  32.  
  33.           The "WH" command, and others, can determine that an address is "inside MacsBug".
  34.  
  35.           The "DV" command includes some credits.  "dv v" shows just the version, with
  36.           no credits.  MacsBug gets its version from its 'vers' 1 resource.
  37.  
  38.           The CurApName display uses an ellipsis character to truncate long names, rather
  39.           than an underscore.
  40.  
  41.           Added an 8-bit-deep blitter (speeds up display on video cards that cannot switch
  42.           to 1-bit mode).  Made the one-bit blitter faster, too.  Made scrolling up and
  43.           down faster for all bit depths.
  44.           
  45.  
  46.           MACROS
  47.           ------
  48.           Changed the maximum command line length to 250 (was around 90 before).  So now you
  49.           can have very long macro expansions.
  50.  
  51.           Added a macro called "StdLog" (standard log), which is great for writing up bug
  52.           reports.  It creates a log file full of info that system software engineers like
  53.           (stack crawls, register dump, configuration info, etc).
  54.  
  55.           Lots of random cleanups of the macros.  Removed redundant macros.
  56.  
  57.           Changed "da" and "dd" macros to "DApp" and "DDrvr", because "da" and "dd" are valid
  58.           hex numbers.
  59.  
  60.  
  61.           DISASSEMBLY
  62.           -----------
  63.           Trap vector names now show up in disassembly (and elsewhere) just as if you had a
  64.           macro mapping into every address in the trap dispatch table.  For example,
  65.           MOVEA.L $06F4,A0 now disassembles as MOVEA.L jCacheFlush,A0.  The trap is vCacheFlush,
  66.           but the "v" (for vector) gets automatically changed to a "j" (for jump).
  67.  
  68.           The forms JSR ([$xxxx]) and JSR ([$xxxx],$yyyy) now support macro-style symbols for
  69.           the $xxxx values.
  70.           
  71.           (Of course, do NOT use trap-table addresses in application code, but when you come
  72.           across the system doing so, it's much easier to see what's going on now.)
  73.  
  74.           Fixed bugs in selector comparison (it was not always sign extending correctly).
  75.  
  76.           Disassembly now recognizes a CLR.W before a trap word as setting up selector with
  77.           value zero.
  78.  
  79.           The PC disassembly window refreshes when you change D0-D7, A0-A7, SR, or PC.  It
  80.           was only refreshing on PC changes, but the others also affect the disassembly,
  81.           because of symbolic info on JSR (Ax), "will branch" messages, and "will loop" (DBxx)
  82.           messages.
  83.  
  84.  
  85.           TRAP NAMES
  86.           ----------
  87.           Generally brought tons of traps and selectors up to date and made them better.
  88.  
  89.           Updated PowerMgrDispatch stuff to match WWDC 94 Technology CD document.  However,
  90.           MacsBug can't handle the different variants of OS-range traps having different names
  91.           and different selectors, so the $A085 trap disassembles strangely.  The $A685
  92.           (PowerMgrDispatch) stuff is all there, but it (incorrectly) shows up for all variants
  93.           ($A085, $A285, $A485, as well as $A685).
  94.  
  95.  
  96.           DCMDS
  97.           -----
  98.           Several commands now draw bullet characters in place of all control characters in
  99.           strings (affects 'file' showing Return characters in filenames, for example).
  100.         
  101.           Gestalt command dumps all Gestalt selectors.  Supports System 7.5 Gestalt table format
  102.           as well as older versions.
  103.         
  104.           The 'rd' command now shows an asterisk after any handle that has been purged.  It also
  105.           accepts capital letters for the options.
  106.  
  107.  
  108.           BUG FIXES
  109.           ---------
  110.           Fixed some random memory accesses that were happening on non-Color QuickDraw machines
  111.           during MacsBug startup.  This was causing the mouse to freeze in one or two directions
  112.           on a Mac Plus.
  113.  
  114.           Fixed trashing of D3 and A2 in BlitCharOneBit and BlitCharEightBits.
  115.  
  116.           Changed PBControlSync to PBStatusSync because we were trying to do a cscGetMode
  117.           instead of a cscSetMode.  (Affects compatibility with certain video drivers.)
  118.  
  119.  
  120. • 6.5d8      TOTALLY NEW STUFF
  121.           -----------------
  122.           
  123.           Over the last few releases, we've worked to make MacsBug a bit more user-
  124.           configurable and customizable. However, these configuration options have
  125.           thus far been limited to setting bits in a preference resource, which
  126.           doesn't allow for many on-the-fly changes. We've added a new general-purpose
  127.           command that will enable behaviour changes any time you wish. The new command,
  128.           SET, will be able to take a variety of options. The first is the new
  129.           "ScrollPrompt" feature. By entering a command such as, "SET SCROLLPROMPT OFF",
  130.           MacsBug can be told to never wait for a key if a new page of the scrollback
  131.           history has become filled. Other variants of the new command are shown in
  132.           the built-in help. In the future you'll find lots of other cool things you'll
  133.           be able to do.
  134.  
  135.           There's now a 512-byte scratch memory area within MacsBug that's available for
  136.           whatever you like. It's called "PlayMem" (TMON user's will recognize this), and
  137.           can be used within any expression. The constant will evaluate to the address of
  138.           the beginning of the buffer area.
  139.  
  140.           A-TRAP DISASSEMBLY
  141.           ------------------
  142.  
  143.           Removed bogus duplicate A-trap name for StdOpcodeProc (it's really $ABF8;
  144.           it was also in the table as $ABC8).
  145.  
  146.           Fixed vFileReal to be vFileRead.
  147.  
  148.           Unused/unknown A-traps now disassemble as "DC.W $Axyz" instead of "TB z" or "OS z".
  149.  
  150.           Lots of new names have been added to previously existing selectors, but they are
  151.           too numerous to go into here.
  152.  
  153.           All calls have been updated to the more verbose new Inside Macintosh naming
  154.           conventions. All old versions still work through the magic of macros.
  155.           
  156.           Disassembling selector-based calls is now much smarter when it comes to identifying
  157.           the correct call. When it looks back up the code stream to identify the selector
  158.           value, it is more knowledgeable about the various MOVE immediate instructions.
  159.           It no longer unhelpfully interprets random data as selector values.
  160.  
  161.           A-TRAP TRACING
  162.           --------------
  163.           
  164.           It now correctly works again (no more _Open calls). It'll be more verbose in the
  165.           future, but at least it now does what it did before.
  166.  
  167.           A-TRAP RECORDING
  168.           ----------------
  169.  
  170.           Versions of MacsBug from 6.4 through 6.5d6 had a serious bug that appeared
  171.           during A-Trap recording. When recording OS calls, we save the first 8 bytes
  172.           pointed to by register A0, for display by the 'ATP' command. In the
  173.           instances that A0 isn't an input parameter to the trap, and contains an
  174.           invalid pointer (outside of valid memory on the target machine), MacsBug
  175.           takes the precaution of installing a special bus error handler when it
  176.           attempts to copy the data. However, previous versions improperly installed
  177.           the handler (they hooked on top of two vectors, both of which were wrong).
  178.           Thus, if a bus error occurred during the copy, MacsBug's primary handler
  179.           would    take control and display the error to the user, which was completely
  180.           the wrong thing to do.
  181.  
  182.           HEAP DUMPS
  183.           ----------
  184.           
  185.           When MacsBug dumps heaps that contain resources from open files, it is more
  186.           careful in showing the error, "** bad rsrc map**".          
  187.  
  188.           SCROLLBACK HISTORY
  189.           ------------------
  190.  
  191.           The supported sizes of the scrollback history buffer have been changed to
  192.           allow for a much larger buffer. Previously, only values of 0-32767 were
  193.           supported, which specified the requested history buffer size in bytes. 0
  194.           and 1-255 indicated that no history buffer should be allocated at all. Now
  195.           values of 32768-65535 are valid, and 1-255 indicate special larger sizes.
  196.           For 1-255, the value is multiplied by 64K, giving a range of 64K-16MB in
  197.           64K increments. Zero is still supported to allocate no buffer.
  198.  
  199.           (Page Up/Down mostly work, but there are still a few problems.)
  200.  
  201.           SYMBOL LOOKUP
  202.           -------------
  203.           
  204.           If we break into MacsBug with VM enabled and paging isn't safe, we now act
  205.           as though symbol display is turned off (via the "SX" command). Doing symbol
  206.           lookups causes heaps throughout memory to be walked, possibly causing quite
  207.           a bit of paging to take place. This is an extremely evil thing for a low-level
  208.           debugger to do, and we're trying to be as nice as we possibly can.
  209.  
  210.           COMMAND-: SYMBOL LOOKUP
  211.           -----------------------
  212.           
  213.           Fixed the infamous C++ unmangled symbols problem. MacsBug would show you the
  214.           symbol in the Command-: window, but it wouldn't evaluate it unless you stripped
  215.           the quotes from the unmangled name. This is no longer necessary.
  216.           
  217.           If you hold down the Option key when pressing return after selecting a symbol,
  218.           the address of the symbol is entered onto the command line, rather than the
  219.           symbol itself. However, if you navigate the list by typing and use this feature,
  220.           it used to dump a semi-random address. This has been fixed.
  221.  
  222.           MEMORY DISPLAY
  223.           --------------
  224.           
  225.           When displaying addresses that correspond to bus error vectors (0x00000008
  226.           through 0x0000000B and VBR+0x00000008 through VBR+0x0000000B), we now show the
  227.           previous vector addresses, not the MacsBug handlers. This should make it a bit
  228.           easier to find your code if you replace either bus error vector.
  229.  
  230.           The built-in font now contains the entire high-ASCII character set for a more
  231.           useful display ($20 through $D9). You can now type all of these characters as
  232.           well.
  233.  
  234.           Template related code has been fixed to not cause address errors on 68000
  235.           machines.
  236.  
  237.           STACK CRAWL
  238.           -----------
  239.           
  240.           When determining if a given address is really a return address as we walk up
  241.           the stack, we no longer cause page faults. This should make the stack crawl
  242.           commands a bit more useful when used in an environment where VM paging is not
  243.           safe.
  244.  
  245.           BREAKPOINTS
  246.           -----------
  247.           
  248.           If you set or clear a breakpoint, the disassembly display area above the command
  249.           line will be redrawn, in case there's an upcoming break that's already been called
  250.           out with a bullet alongside an address.
  251.  
  252.           REGISTERS
  253.           ---------
  254.           
  255.           Code dealing with setting and displaying the Status Register now realizes it is
  256.           16-bits in length and always has been. This bug has been present since at least
  257.           6.2.
  258.  
  259.           LOGGING
  260.           -------
  261.           
  262.           If you attempt to turn the log on or off when the file system is busy, MacsBug
  263.           will warn you that this is impossible. This helps a bit in preventing data on
  264.           your drives from being corrupted, but there's still a huge architectural flaw
  265.           in the whole thing (ask me about my 400 MB I had to restore from tape...). In a
  266.           nutshell, it works, but just barely.
  267.  
  268.           MISCELLANEOUS
  269.           -------------
  270.           
  271.           Keyboard repeat rates have been fixed for the Mac Plus (it no longer spews tens of
  272.           keys for each individual keypress).
  273.  
  274.           DCMDS
  275.           -----
  276.           
  277.           RD - The help explains what the various attributes flags are. Map $0003 shows up
  278.           with a special name now, instead of garbage (it makes ROM resources override the
  279.           system). The command aborts much faster now if you press a key. Fixed problems of
  280.           excess filtering when you used -f along with -t or -i (or when you used -i at all).
  281.  
  282.  
  283. • 6.5d7 - NOTE: This version sorta-kinda exists. It was released to a small number of
  284.           individuals related to the System 7.5 and PowerPC v0 teams, but it was never
  285.           generally released. There are actually a few different versions of d7, so it was
  286.           decided the best thing to do was say, "don't use it - use 6.5d8 instead".
  287.  
  288.  
  289. • 6.5d6 - HEAP SCRAMBLING
  290.           ---------------
  291.  
  292.           It works again, what more can I say? Starting with MacsBug 6.5d1 (before I
  293.           took over the project), the Heap Scramble command was broken for all Memory
  294.           Managers, including 24-bit, 32-bit, and Modern. It now works properly for
  295.           the classic Memory Managers, and for the first time, is works equally well
  296.           for Modern-style blocks and heaps.
  297.  
  298.           If you break into MacsBug because of a Heap Scramble failure, the proper
  299.           tool name will be displayed. It used to try to display the names of
  300.           selector-based tools, but failed, since we only scramble on a few real
  301.           A-Traps. All you would see is a bunch of gunk, but no harm was done.
  302.  
  303.           EXCEPTION HANDLER
  304.           -----------------
  305.           
  306.           While you're sitting at the command line, MacsBug has its own bus error
  307.           handler installed. If something goes wrong, you'll generally see the
  308.           message "Unable to access that address". However, if the exception was
  309.           generated by code within MacsBug, finding the code that actually caused
  310.           the exception was quite difficult. Now MacsBug displays some simple
  311.           diagnostic information, including the Program Counter of the code that
  312.           really caused the exception.
  313.  
  314.  
  315. • 6.5d5 - With the addition of "User Debugger Prefs" there's been a lot of confusion.
  316.           So, in an effort to reduce this, and make absolutely sure each version of
  317.           MacsBug has available the resources it needs to run, "User Debugger Prefs"
  318.           is no longer supported, and the Debugger Prefs resources now exist within
  319.           MacsBug itself (that's why it's now almost 400K on disk). All custom
  320.           resources should go into Debugger Prefs, and MacsBug's resources should be
  321.           left alone.
  322.  
  323.         - We now check for duplicate dcmds at startup and display their names.
  324.           You'll see this list (if you have any duplicates) the first time you enter
  325.           MacsBug.
  326.  
  327.         - Increased the number of words that DH can disassemble at once from 6 to 18.
  328.  
  329.         - Fixed a minor bug with A-Trap actions. If you had an action set on any
  330.           selector, removed it, and then did an 'ATSS', 'ATB', or 'ATHC' with no
  331.           parameters, the range start would appear to be the old selector. We were
  332.           setting the selector flag and value fields in the trap record if the
  333.           selector was specifically described, and we weren't clearing them
  334.           otherwise. Since the new action record was in the location of the old
  335.           record, the uninitialized fields were used.
  336.  
  337.         - When an A-Trap Trace is displayed, we now show the name of the selector
  338.           instead of its parent A-Trap, if necessary. This means if you do an 'ATT'
  339.           on _GetFrontProcess, for instance, when the trace information is dumped
  340.           into the MacsBug history, the trap name will be _GetFrontProcess instead
  341.           of its parent, _OSDispatch.
  342.  
  343.         - When you break into MacsBug because of an A-Trap action on a selector-
  344.           based call, the selector name will be displayed instead of the parent
  345.           A-Trap name.
  346.         
  347.         - We now mostly work on 68000 machines (again). If the trap name STR#
  348.           resources were an odd length, we'd address error at startup while trying to
  349.           load them. We now pad them in memory to be word-aligned, just like all of
  350.           our other structures (would you belive I solved this one with MicroBug?)
  351.  
  352.         - Updated the TestDcmd application:
  353.             -Made the font draw like they do Macsbug (you get space through ~, plus
  354.              ≈ and † and … and •, and everything else is a bullet).
  355.             -Made Command-G = Command-Q.
  356.             -Made ? = help.
  357.             -When the screen is paused, still proccess events except for non-Command
  358.              keypresses.
  359.             -Made space continue as well as return/enter.
  360.             -Made Clear/Ctrl-X clear the command line.
  361.  
  362.         - In the 'file' dcmd, made some columns wider and fixed the filename-prefix
  363.           feature.
  364.  
  365.         - In the 'drvr' dcmd, widened the driver name field so you can see longer
  366.           names without truncation.
  367.  
  368.  
  369. • 6.5d4 - Fixed command line history to not get confused when you repeat a previous
  370.           command with Command-V or Command-B. It wasn't resetting the history marker
  371.           when you entered a new command that exactly matched the last command, so you
  372.           could only repeat the last command once, and then the last command would
  373.           become the line prior to that.
  374.           
  375.         - Fixed a nasty bug dealing with most break action commands. If you set more
  376.           than one A-Trap break, A-Trap Step Spy, or Breakpoint, each new break
  377.           would overwrite the previous, corrupting it. The record that could become
  378.           the most damaged was that of the Step Spy, which could cause MacsBug to
  379.           become way confused the next time it walked the table. Almost not broken
  380.           just isn't good enough for me!
  381.  
  382.         - Breaking on selector-based calls now works! If you want to break on one of
  383.           these calls, ATB (and all of its variants) now use the same structures
  384.           that provided for the disassembly of selector-based calls. I've slightly
  385.           modifed the displays for the ATB and ATD commands to account for the fact
  386.           that you're not necessarially breaking on all calls of a specific ATrap.
  387.           It now shows you both the selector name and ATrap name, plus the ATrap
  388.           and selector values.
  389.  
  390.           The way that this works is cool enough that you can still provide a
  391.           conditional break expression which allows for even more fine-tuning of
  392.           when to break. So something like, "ATB _GetFrontProcess D0.w=-1" will
  393.           work, even though in most cases it's not really that useful, since in this
  394.           case it's already implicitly breaking on the expression "(SP)^.w=39".
  395.           
  396.           If there are calls that you can't seem to break on, there are a number of
  397.           reasons why. The most-likely is that I simply haven't yet added calls of
  398.           that particular A-Trap to the prefs file (although it could be there and
  399.           I simply screwed up the selector).
  400.           
  401.         - Because of the above, I've removed lots of redundant macros from the 
  402.           Debugger Prefs file (the ones that did the "ATB _CallName d0.w=#x").
  403.  
  404.         - MacsBug now supports a new preference resource (which can be located in
  405.           either the User or standard Debugger Prefs file) of type 'mxpr'. Its
  406.           sole purpose in life right now is to support some cool power-user
  407.           "danger prefs" that support doing things a bit faster. There's a ResEdit
  408.           TMPL provided in Debugger Prefs which allows you to edit the various
  409.           defined bits. I recommend copying it into your User Debugger Prefs file
  410.           (since that's why I added the file anyway) and changing it there.
  411.           I'll probably eventually add new commands to MacsBug itself that let you
  412.           modify the more useful preferences at run-time.
  413.         
  414.         - Two preferences bits support disabling the little-known self-checksum
  415.           feature. Normally, after you execute any command from the command-line,
  416.           MacsBug performs a checksum on all of its code, and warns you if it was
  417.           modified. While this can be quite useful, most will never see the message.
  418.           The annoying bit is that this takes a heck of a lot of time (MacsBug's
  419.           code is about 100K in memory right now, so on my analyzer-bait Mac II the
  420.           checksum takes 151.1ms).
  421.           
  422.           Now you can selectively disable the checksum in all cases by setting the
  423.           "Never checksum MacsBug code" bit. If you'd like some assurances that
  424.           MacsBug wasn't stomped on, you can set the "Only checksum code on entry"
  425.           bit. When you enter MacsBug, either through a DebugStr or Debugger trap
  426.           or via an NMI, it will perform the checksum. Note that the "never" bit
  427.           overrides the setting of this bit.
  428.  
  429.         - One other bit has quite a noticeable effect on stepping and tracing with
  430.           a machine that has a single monitor (or one that has MacsBug on its main
  431.           device). This bit, "Don't swap screen if stepping", does just what it
  432.           says. If you step with this bit set, MacsBug will never swap the display
  433.           to show the original video buffer. This is slightly dangerous if you're
  434.           stepping code that does draw directly to the screen (because the video
  435.           card could have been in an entirely different mode than what it is when
  436.           you're in MacsBug). However, it will have no effect if you trace over a
  437.           QuickDraw trap, because the display _will_ be swapped in that case. Use
  438.           this, it's waaaaay cool. And faster too.
  439.  
  440.         - Added macros for GSBug users (me) who just can't seem to type the right
  441.           commands while in MacsBug. STB now works for ATB, CTB now works for ATC,
  442.           and SH works for ATD (actually, these were added in 6.5d2, but I neglected
  443.           to mention it then).
  444.  
  445.         - Twiddled the message for MCC when a macro is cleared. It now says,
  446.           "Macro '<macroname>' cleared" instead of "'<macroname>' cleared.
  447.           Dave freaked for a second when he typed "MCC heap", and MacsBug responded
  448.           with "Heap cleared". :-)
  449.  
  450.          - Modified the 'vbl' dcmd to use uppercase in hex displays (we're picky
  451.           people). It now dumps all of the non-empty slot VBL queues in addition to
  452.           the standard queue.
  453.  
  454.  
  455. • 6.5d3 - Modified to load selector traps, macros, templates, and DCMDs from two files.
  456.           We still load from Debugger Prefs, however, we now support a new file, "User
  457.           Debugger Prefs". This allows you to paste all of your custom resources into
  458.           the User file, and not worry about having to copy resources when you upgrade
  459.           the standard DP file. We also now allow 'mxbi', 'mxbc' and 'KCHR' resources
  460.           to be found in the User file to override the default ones we ship in the DP file.
  461.           
  462.           This change causes all of the above mentioned resources to be loaded in
  463.           the opposite order that they were in previous versions (all types of
  464.           resources are now loaded increasing from index 1).
  465.  
  466.         - The Clear key and Control-X now clear the entire command line and move the
  467.           cursor to the left edge.
  468.  
  469.         - The key delay to repeat and repeat rate have been (hopefully) equalized
  470.           for all machines. No more annoying slowness on fast machines.
  471.  
  472.         - Sped up the one-bit single character blitter to be as fast as it was in
  473.           6.2.2. The overall string drawing throughput is slower than 6.2.2, but
  474.           it'll probably get faster in later versions. As compared to 6.5d2, however,
  475.           the blitter is 6.3 times faster, which is quite cool.
  476.  
  477.  
  478. • 6.5d2 - Added a new resource type, 'mxst', to Debugger Prefs for the display of
  479.           toolcall names that are selector-based (ie. HFSDispatch). This allows you
  480.           to see the names of the real calls, rather than simply the dispatch trap name.
  481.           Eventually you'll be able to break on the names, instead of having to define
  482.           macros like you do now. I added a bunch of toolcall names to Debugger Prefs,
  483.           but there are certainly some missing, and there may be some that are incorrect.
  484.  
  485.  
  486. • 6.5d1 - Moved toolbox and OS trapnames into STR# resources in the Debugger Prefs
  487.           file. Added initial support for the Modern Memory Manager.
  488.  
  489.           
  490. • 6.4a9 - Fix breakpoints in ROM to actually break.
  491.         - Fix to not mess with the interupt levels if we enter MacsBug in user mode.
  492.  
  493.           
  494. • 6.4a8 - Fix problem with the calculation of video slot address causing some
  495.           machines to not boot.
  496.         - Remove indication of bit depth from MacsBug screen. This bit depth was
  497.           indicating what the depth MacsBug was operating in not the depth of the
  498.           monitor when running normally.
  499.   
  500.  
  501. • 6.4a7 - Support for multibit video.